package com.cy.mall.dao.mapper.goods;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.cy.mall.model.domain.goods.Goods;
import com.cy.mall.model.query.goods.GoodsListQuery;
import com.cy.mall.model.vo.goods.GoodsDetailVO;
import com.cy.mall.model.vo.goods.GoodsListVO;
import com.cy.mall.model.vo.product.ProductRateVO;

import tk.mybatis.mapper.common.BaseMapper;

/**
 * 商品 GoodsMapper
 *
 * @author tanyilin
 *
 * @create 2019年1月23日 下午4:16:21
 */
@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {

	int selectGoodsListCount(GoodsListQuery query);

	List<GoodsListVO> selectGoodsList(GoodsListQuery query);

	/**
	 * 查询商品详情
	 * 
	 * @param goodsId
	 * @return
	 */
	GoodsDetailVO selectGoodsDetail(@Param("goodsId") Long goodsId);

	/**
	 * 查询相应贷款产品利率列表
	 * 
	 * @param productId
	 * @return
	 */
	List<ProductRateVO> selectProductRateList(@Param("productId") Long productId);

}
